package com.chenfan.process.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chenfan.process.entity.po.TransferLogDetailPo;
import com.chenfan.process.repository.TransferLogDetailRepository;
import com.chenfan.process.service.TransferLogDetailService;
import org.springframework.stereotype.Service;

/**
 * @author liuming
 * @date 2021/11/1
 */
@Service
public class TransferLogDetailServiceImpl extends ServiceImpl<TransferLogDetailRepository, TransferLogDetailPo>
    implements TransferLogDetailService {

    @Override
    public Page<TransferLogDetailPo> pageTransferLog(Long id, Integer pageNum, Integer pageSize) {
        Page<TransferLogDetailPo> page = new Page<>(pageNum, pageSize);
        LambdaQueryWrapper<TransferLogDetailPo> lambdaQueryWrapper = Wrappers.lambdaQuery();
        lambdaQueryWrapper.eq(TransferLogDetailPo::getTransferId, id);
        return this.page(page, lambdaQueryWrapper);
    }
}
